<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Ripple's Blog</title>
    <!-- Bootstrap core CSS -->
    <link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/examples/dashboard/dashboard.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/assets/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!--    markdown编辑器-->
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-21475122-5']);
      _gaq.push(['_setCustomVar', 1, 'Repo', 'lepture/editor']);
      _gaq.push(['_trackPageview']);
      _gaq.push(['_trackPageLoadTime']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        if (location.port) {
          return;
        }
        ga.src = 'http://www.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    </script>


    <!--    <link rel="stylesheet" href="http://cdn.jsdelivr.net/editor/0.1.0/editor.css">-->
    <!--    <script src="http://cdn.jsdelivr.net/editor/0.1.0/editor.js"></script>-->
    <!--    <script src="http://cdn.jsdelivr.net/editor/0.1.0/marked.js"></script>-->
    <!--    <link rel="stylesheet" href="http://lab.lepture.com/editor/editor.css" />-->
    <!--    <script type="text/javascript" src="http://lab.lepture.com/editor/editor.js"></script>-->
    <!--    <script type="text/javascript" src="http://lab.lepture.com/editor/marked.js"></script>-->
    <style type="text/css">
      body {
        padding: 0;
        margin: 0;
        background-color: #f9f9f7;
      }
      .editor-wrapper {
        max-width: 680px;
        padding: 10px;
        margin: 60px auto;
      }
      #editor {
        width: 800px;
        height: 500px;
      }
      .title {
        width: 500px;
      }
    </style>
</head>
<body>
<nav th:replace="~{public/nav_footer :: nav}"></nav>


<nav th:replace="~{public/dashboard :: sidebar}"></nav>
<div class="editor-wrapper">
    <form method="post" th:action="@{/admin/articleMod/} + (${article != null} ? ${article.articleId} : '') + '/to'">
        <label for="articleTitle" th:class="(${article_input_error_msg} != null) ? '' : sr-only" style="color:red">[[ ${article_input_error_msg} ]]</label>
        <input th:value="${article != null} ? ${article.articleTitle} : ''" class="title" type="text" placeholder="Title" name="articleTitle" id="articleTitle" />
        <input th:value="${article != null} ? ${article.secondArticleTitle} : ''" class="title" type="text" placeholder="SecondTitle" name="secondArticleTitle" />
        <textarea th:text="${article != null} ? ${article.articleContent} : ''" id="editor" placeholder="Content here ...." name="articleContent"></textarea>

        <input th:value="${clsName != null} ? ${clsName} : ''" type="text" class="form-control"  placeholder="分类（只能输入一种）" name="clsName">
        <input type="text" class="form-control"  placeholder="标签（可以输入多个，用+隔开）" name="articleTags">
        <button type="submit" class="btn btn-default">提交</button>
    </form>
</div>

<br/><br/><br/><br/>

<!--    <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>-->
<!--    <script type="text/javascript">-->
<!--        (function($) {-->
<!--          $('#editor').load('markdown.md',-->
<!--            function(data) {-->
<!--              var editor = new Editor();-->
<!--              editor.render();-->
<!--            }-->
<!--          );-->
<!--        })(Zepto);-->
<!--    </script>-->

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/dist/js/bootstrap.min.js"></script>
<!-- Just to make our placeholder images work. Don't actually copy the next line! -->
<script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/assets/js/vendor/holder.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.16/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>